﻿using System;
using System.ServiceModel.Channels;
using System.Xml;

namespace RockBus.Messages.Interfaces
{
    public interface IMessage : IDisposable
    {
        MessageBuffer MessageBuffer { get; }

        Message Message { get; }

        bool UseBuffer { get; }

        int MaxBufferSize { get; }

        string Action { get; }

        MessageHeaders Headers { get; }

        MessageProperties Properties { get; }

        MessageVersion Version { get; }

        string GetMessageVersionAsString();

        byte[] ConvertToByteArray();

        bool IsEmpty { get; }

        bool IsFault { get; }

        Message MarshalMessage(MessageVersion messageVersion);

        string MessageAsString();

        XmlReader GetReaderAtBodyContents();
    }
}